<?php
// +----------------------------------------------------------------------
// | author: thinkphp
// +----------------------------------------------------------------------

namespace app\common\enum;

/**
 * 审批枚举
 * Class YesNoEnum
 * @package app\common\enum
 */
class StatusEnum
{
    const PENDING = 1; //待审批
    const APPROVED = 2; //已审批
    const REJECTED = 3; //审批拒绝

    /**
     * @notes 获取禁用状态
     * @param bool $value
     * @return string|string[]
     */
    public static function getStatusDesc($value = true)
    {
        $data = [
            self::PENDING => '待审批',
            self::APPROVED => '通过',
            self::REJECTED => '不通过',
        ];
        if ($value === true) {
            return $data;
        }
        return $data[$value];
    }
}